#include <stdio.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/epoll.h>
#include <netinet/in.h>
#include < pthread.h>
#include <fcntl.h>
#include "queue.h"
#define MAX_EVENTS 50
int create_sock();
void *epoll_listen(void *arg);
void *custumor(void *arg);
int setnonblocking(int fd);
void analysis(char *buf);
typedef struct {
    sem_t semw;
    sem_t semr;
    pthread_mutex_t mutex;
    
    QUE *queue;
}model;